Fix build_all_exclude
authortorkleyy <thomas-schaller2000@gmx.de>
Tue, 16 May 2017 17:44:05 +0000 (19:44 +0200)
committertorkleyy <thomas-schaller2000@gmx.de>
Sat, 27 May 2017 19:02:21 +0000 (21:02 +0200)
by using with_stderr_contains because
parallel build may mix up the lines.

Additionally, remove the last line of
the benchmark.

tests/bench.rs
tests/build.rs
tests/test.rs

index 96b30aa1cac1634f0d705579beae2666e31c23da..d8043c7d70f85819fb813a25bcb443af9a83eb26 100644 (file)
@@ -1061,9 +1061,7 @@ fn bench_all_exclude() {
                 execs().with_status(0)
                     .with_stdout_contains("\
 running 1 test
-test bar ... bench:           0 ns/iter (+/- 0)
-
-test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured"));
+test bar ... bench:           0 ns/iter (+/- 0)"));
 }
 
 #[test]
index 20f0d4b376d4e37e6cacd3d7813d52bf41f07d9e..3fdedf8252512ec397ad3f505c2b4500470afd3d 100644 (file)
@@ -2841,9 +2841,9 @@ fn build_all_exclude() {
                  .arg("--exclude")
                  .arg("baz"),
                 execs().with_status(0)
-                       .with_stderr("[..] Compiling bar v0.1.0 ([..])\n\
-                       [..] Compiling foo v0.1.0 ([..])\n\
-                       [..] Finished dev [unoptimized + debuginfo] target(s) in [..]\n"));
+                       .with_stderr_contains("[..]Compiling foo v0.1.0 [..]")
+                       .with_stderr_contains("[..]Compiling bar v0.1.0 [..]")
+                       .with_stderr_does_not_contain("[..]Compiling baz v0.1.0 [..]"));
 }
 
 #[test]
index 07edf1952e87b5d4f8b2a79d47e648c63b08fa67..c05593d14bf65c43f8ccc03fc56c16f4d822d571 100644 (file)
@@ -2418,9 +2418,7 @@ fn test_all_exclude() {
                     .arg("baz"),
                 execs().with_status(0)
                     .with_stdout_contains("running 1 test
-test bar ... ok
-
-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured"));
+test bar ... ok"));
 }
 
 #[test]